function $_Menu(){
	this.leftMenu
	this.url;
	this.title;
	this.previousClick;
}

$_Menu.prototype = {

	init : function() {
	
	},
	getMenu : function($config){
		var loader = new Ext.tree.TreeLoader({
            dataUrl:$config.url,
            clearOnLoad:true
	    });
	    loader.on('load',function($this, $node, $response ){
	    	  //检查session是否过期
			  checkTimeOut($response);
	          var result=Ext.decode($response.responseText);
	          if(result.failure!='undefined'&&result.failure){
	          	Ext.Msg.alert('错误',result.msg,function() {
	          		if(result.callback!='undefined'){
		          		eval(result.callback);
	          		}
		          });
	          }
	    });
		//override the function of processResponse
    	loader.processResponse = function(response, node, callback, scope) {
			var json = response.responseText;
			try {
				var o = response.responseData || Ext.decode(json);
				node.beginUpdate();
				for (var i = 0, len = o.length; i < len; i++) {
					// 在原代码基础上增加了下面处理-----------
					o[i].qtip = o[i].tips;	//提示信息
					// -------------------------------------
					var n = this.createNode(o[i]);
					if (n) {
						node.appendChild(n);
					}
				}
				node.endUpdate();
				this.runCallback(callback, scope || node, [node]);
			} catch (e) {
				this.handleFailure(response);
			}
		};
	    
		var root = new Ext.tree.AsyncTreeNode();
		var treePanel = new Ext.tree.TreePanel({
	    	id: Global.STD_WEST_MENU.id,
	    	title: $config.title,
	    	width:126,
	        region:'west',
	        bodyStyle:' background-color: #ecf3fb',
	        split: true,
//	        width:LEFT_WINDOW_WIDTH,
	        height: LEFT_WINDOW_HEIGHT,
	        autoScroll: true,     
	        collapsible: false,
	        rootVisible: false,
	        lines: false,
	        useArrows: true,
	        listeners:{
	        	"click":function($node){
			           if($node.id !== $_Menu.previousClick || typeof($_Menu.previousClick) === 'undefined'){
							$_Menu.prototype.handleNode($node);
			           }
	                   $_Menu.previousClick = $node.id;
	        	}
	        },
	        loader: loader,
	        root: root
	    });
	    return treePanel;
	},
	
	handleNode : function($node){	
		if($node.leaf ){    		
	     	destroyAllOfNewWinArray();
	     	Ext.StoreMgr.clear();
	     	var portal  =   Ext.getCmp('std-panel');        
	    	var postdata = {
	    		panelId : $node.attributes.id
	    	};
			AjaxDelegate($node.attributes.action, portal.callback, postdata,'return','');
		}
	}	
	
	
};

